# 定位一组元素
import time

from selenium import webdriver
import os
driver = webdriver.Chrome()
file = "file:///" + os.path.abspath("e:\比特课件\selenium2html\checkbox.html")
driver.get(file)
driver.maximize_window()
# driver.find_element_by_id("c1").click()
# driver.find_element_by_id("c2").click()
# driver.find_element_by_id("c3").click()

inputs = driver.find_elements_by_tag_name("input")
# 从一组元素中找出type= ckeckbox
for n in inputs:
    if n.get_attribute('type') == 'checkbox':
        n.click()

time.sleep(3)
driver.quit()
